// 配置别名
const path = require('path');
const pathResolve = (pathname) => path.resolve(__dirname, pathname);
// less
const CracoLessPlugin = require('craco-less');

module.exports = {
  // less
  plugins: [
    {
      plugin: CracoLessPlugin,
      // options: {
      //   lessLoaderOptions: {
      //     lessOptions: {
      //       modifyVars: {
      //         '@primary-color': '#1DA57A',
      //         '@link-color': '#1DA57A',
      //         '@border-radius-base': '2px',
      //       },
      //       javascriptEnabled: true,
      //     },
      //   },
      // },
    },
  ],

  // webpack
  webpack: {
    alias: {
      '@': pathResolve('src'),
      'Compoments': pathResolve('src/compoments/'),
      'Utils': pathResolve('src/utils/'),
      '@mui/styled-engine': '@mui/styled-engine-sc',
    },
  },
};
